<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include/head::page-head(title=${'代码自动生成工具'})"></head>
<body>
<form th:action="@{/sys/config/db/dbs}" method="post" class="layui-form" lay-filter="dbConfig">
    <div class="layui-form-item">
        <label class="layui-form-label">数据库类型：</label>
        <div class="layui-input-inline">
            <select name="dialect" lay-filter="dialect">
                <option th:value="${item}" th:each="item : ${dialects}" th:text="${item}">Mysql</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">主机名或IP：</label>
        <div class="layui-input-inline">
            <input type="text" name="host" lay-verify="required" data-schema="required" placeholder="请输入主机名或IP" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">端口号：</label>
        <div class="layui-input-inline">
            <input type="text" name="port" lay-verify="required" data-schema="required" placeholder="请输入端口号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">用户名：</label>
        <div class="layui-input-inline">
            <input type="text" name="username" lay-verify="required" data-schema="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码：</label>
        <div class="layui-input-inline">
            <input type="text" name="password" placeholder="请输入密码" data-schema autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">数据库：</label>
        <div class="layui-input-inline">
            <select name="schema" lay-filter="schema" lay-verify="required" lay-search>
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">编码：</label>
        <div class="layui-input-inline">
            <select name="encoding" lay-filter="encoding">
                <option value="UTF8">UTF8</option>
                <option value="GB2312">GB2312</option>
                <option value="GBK">GBK</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="save">保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript" th:src="@{/static/database.js}"></script>
</body>
</html>